#pragma once
#include "mkvmuxinpin.hpp"
//#include "mkvstreamvideo.hpp"

namespace MkvMux
{

class MkvContext;
class MkvStreamVideo;

class InpinVideo : public Inpin
{
    InpinVideo(const InpinVideo&);
    InpinVideo& operator=(const InpinVideo&);
    
public:

    explicit InpinVideo(Filter*);
    ~InpinVideo();
    
    HRESULT STDMETHODCALLTYPE QueryAccept(const AM_MEDIA_TYPE*);
    HRESULT STDMETHODCALLTYPE GetAllocatorRequirements(ALLOCATOR_PROPERTIES*);

protected:

    HRESULT OnInit();
    void OnFinal();

    HANDLE GetOtherHandle() const;
    
    HRESULT QueryAcceptMPEG2(const AM_MEDIA_TYPE&) const;
    HRESULT QueryAcceptVP80(const AM_MEDIA_TYPE&) const;
    HRESULT VetBitmapInfoHeader(const BITMAPINFOHEADER&) const;

    HRESULT GetAllocatorRequirementsMPEG2(ALLOCATOR_PROPERTIES&) const;
    HRESULT GetAllocatorRequirementsVP80(ALLOCATOR_PROPERTIES&) const;

    static MkvStreamVideo* CreateStreamMPEG2(MkvContext&, const AM_MEDIA_TYPE&);
    static MkvStreamVideo* CreateStreamVP80(MkvContext&, const AM_MEDIA_TYPE&);    

};
    
}  //end namespace MkvMux
